home *** CD-ROM | disk | FTP | other *** search
/ SVM Mac 58 / CD-ROM N°58.iso / navigateurs / Netscape Folder / chrome / navigator / content / default / viewsource.js < prev    next >
Encoding:
Text File  |  2000-04-19  |  588 b   |  21 lines  |  [TEXT/MOSS]

  1.   function onLoadViewSource() {
  2.     // Create and initialize the browser instance.
  3.     createBrowserInstance();
  4.  
  5.     if ( appCore ) {
  6.         appCore.isViewSource = true;
  7.         appCore.setContentWindow(window.frames[0]);
  8.         appCore.setWebShellWindow(window);
  9.         
  10.         // Get url whose source to view.
  11.         var url = window.arguments[0];
  12.     
  13.         // Load the source (the app core will magically know what to do).
  14.         appCore.loadUrl( url );
  15.     } else {
  16.         // Give up.
  17.         alert( "Error creating browser instance\n" );
  18.     }
  19.     
  20.   }
  21.